package com.lixiaohan.lushudaohou.controller;

import com.lixiaohan.lushudaohou.dao.RoamUserInfoDao;
import com.lixiaohan.lushudaohou.entity.RoamUserInfo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
@RestController
public class UserController {

    @Resource
    private RoamUserInfoDao roamUserInfoDao;

    @RequestMapping("/getAll")
    public List<RoamUserInfo> getAll(){
        List<RoamUserInfo> all = roamUserInfoDao.findAll();
        for (RoamUserInfo item : all) {
            System.out.println(item);
            System.out.println();
        }
        return roamUserInfoDao.findAll();
    }

    @RequestMapping("/getOne")
    public List<RoamUserInfo> getOne(){
        return roamUserInfoDao.getOne();
    }
}
